Skip to content

Publish immutable runtime manifests and serialize policy updates - #967

Closed
Gajesh2007 wants to merge 2 commits into
masterfrom
fix/runtime-manifest-snapshots
Closed

Gajesh2007 wants to merge 2 commits into
masterfrom
fix/runtime-manifest-snapshots

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

Release updates wrote a plain runtime-manifest pointer while provider verification and the public manifest handler read it repeatedly. Concurrent calls raced, and maps passed to SetRuntimeManifest remained caller-owned: changing those maps after publication changed which runtime hashes were accepted.

Publish immutable snapshots through an atomic pointer, and serialize inventory rebuilds and fallback merges through connected-provider revalidation. Registration, challenge verification and revalidation load one snapshot while holding the provider lock, so hash verification and the resulting provider flags use the same policy. The setter deep-copies all maps, preserving nil sets and false membership values. Public manifest responses also use one snapshot.

Move the runtime-manifest operations out of server.go into runtime_manifest.go. Preserve the union of active releases, legacy backend refusal, manifest-withdrawal routing behavior, inventory-error fallbacks, response schema and cache TTL. The SetRuntimeManifest(nil) comment now describes the existing distinction between the low-level matcher and the routing gate accurately.

flowchart LR
  subgraph Before
    A[Release inventory or committed fallback] --> B[server.go assigns shared manifest pointer]
    B --> C[Verification reads pointer multiple times]
    C --> D[Provider flags may use different policies]
    E[Caller mutates setter input maps] --> B
    B --> F[Manifest handler rereads shared maps]
  end
  subgraph After
    A2[Release inventory or committed fallback] --> B2[runtime_manifest.go serializes rebuild and publication]
    B2 --> C2[Atomic immutable snapshot]
    C2 --> D2[Provider lock: one snapshot for verification and flags]
    B2 --> E2[Revalidate connected providers before next writer]
    F2[SetRuntimeManifest] --> G2[Copy all caller-owned maps]
    G2 --> C2
    C2 --> H2[One complete snapshot per manifest response]
  end
Loading

Validation:

  • Two new baseline fixtures fail on the original source: post-publication caller mutation changes accepted/public hashes, and concurrent publication/verification reports three data races (0.631s).
  • Full final GOTOOLCHAIN=go1.25.0 go test -race ./coordinator/api -count=1 passes (226.591s), including the new concurrent publication/withdrawal checks and 32 simultaneous committed-release fallback merges, plus existing release-overlap, inventory-failure, withdrawal, backend, registration and challenge fixtures.
  • Independent source review covers publication ownership, writer/provider lock ordering, complete verification paths and fixtures. Docs lint passes all 278 pages, and threat-model YAML parses. Documentation cites implementation commit f1ccb8d43.

No provider/model execution or deployment is part of this change.

@vercel

vercel Bot commented Sep 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Sep 12, 2026 9:54pm UTC
d-inference-console-ui-dev Ready Ready Preview Sep 12, 2026 9:54pm UTC
d-inference-landing Ready Ready Preview Sep 12, 2026 9:54pm UTC

Request Review

@Gajesh2007
Gajesh2007 marked this pull request as ready for review September 12, 2026 21:56
@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T21:59:05.640464Z ae96db1 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: ae96db174c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Gajesh2007

Copy link
Copy Markdown
Member Author

Consolidated into #1056 for review and merge after #1094, #1095 and #1096. #1056 contains this branch's exact head (ae96db174c7eb94414635c9b7e8b152153d5afcf), including its reviewed fixes, with implementations and regressions reconciled into the coordinator subsystem owners. Closing the component PR to collapse the stack; its branch, commits and review history are retained. Follow #1056 for combined validation and merge status.

@Gajesh2007 Gajesh2007 closed this Sep 16, 2026

This branch is waiting to be deployed

3 active and 1 waiting deployments
benchmarks — ae96db17 Waiting Sep 12, 2026 by Gajesh2007 via E2E Benchmarks #1061
Preview – d-inference-console-ui-dev — ae96db17 Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference — ae96db17 Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference-landing — ae96db17 Deployed Sep 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant